package com.smart.speaker.config;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.smart.speaker.util.BeanUtils;
import com.smart.speaker.util.JsonUtils;
import com.smart.speaker.util.ToolUtils;
import jakarta.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Configuration;

@Configuration
public class UtilsConfig {

    @Autowired
    private ObjectMapper objectMapper;
    @Autowired
    private ApplicationContext applicationContext;

    @PostConstruct
    public void init() {
        JsonUtils.init(objectMapper);
        BeanUtils.init(applicationContext);
        ToolUtils.init(applicationContext);
    }

}
